cmake_minimum_required(VERSION 3.14)

project(timer LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# find_package(libevent REQUIRED)


link_directories(
    "/usr/local/lib"
    "/usr/lib"
)
include_directories(
    "/usr/local/include"
    "/usr/include"
    "client"
    "server"
)

aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/client clientSrc)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/server serverSrc)


add_executable(client ${clientSrc})
add_executable(udpclient ${CMAKE_CURRENT_SOURCE_DIR}/udpclient/UdpClient.cpp)
add_executable(server ${serverSrc})

target_link_libraries(client event)
target_link_libraries(udpclient event)
target_link_libraries(server event)
